home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / AOCE Sample Code / PowerTalk Access Modules / Sample PMSAM / PMSAM Framework / RoboSamSlot / PMSAMResources.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-28  |  6.8 KB  |  345 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        PMSAMResources.h
  3.  
  4.     Contains:    xxx put contents here xxx
  5.  
  6.     Written by:    Tim Harnett
  7.  
  8.     Copyright:    © 1994 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.         <19>     2/21/95    TMH        metrowerks compatiblity changes
  13.         <18>     2/14/95    TMH        added gEnabledDiagnostics
  14.         <17>      2/9/95    TMH        added LimitErrorReport flag
  15.         <16>      2/6/95    TMH         added bRecieveAfterSendNow
  16.         <15>     1/27/95    TMH        added resource for dir system mapping table
  17.         <14>    12/15/94    TMH        added gAssertsEnabled
  18.         <13>    11/17/94    TMH        more P3 config params
  19.         <12>     11/2/94    TMH        added IO trace resources
  20.         <11>     11/2/94    TMH        put initpacket in resource. add P3 param resource
  21.         <10>    10/28/94    TMH         added async flags to ctbp resource
  22.          <9>    10/25/94    TMH        added kCTBConfigStrAttrTypeResID
  23.          <8>    10/21/94    TMH        more comm config params
  24.          <7>    10/20/94    TMH        added fields to comm
  25.          <6>    10/20/94    TMH        added kCTBMacPadConfigStrings etc.
  26.          <5>    10/18/94    TMH        added 'comm' resource
  27.          <4>    10/14/94    TMH        added AEDTResource
  28.          <3>     10/6/94    TMH        added a sound
  29.          <2>     10/4/94    TMH        added debug flag BreakEveryScheduleEPPC
  30.          <1>     10/3/94    TMH        definition for Dflg resource
  31.                  10/3/94    TMH        xxx put comment here xxx
  32.  
  33.     To Do:
  34. */
  35.  
  36. #ifndef __PMSAMResources__
  37. #define __PMSAMResources__
  38.  
  39. #ifndef REZ
  40.  
  41. //---------------------
  42. //    .h includes
  43. //-----------------------
  44. #ifndef __CRString__
  45. #include "CRString.h"
  46. #endif
  47.  
  48. #endif
  49.  
  50.  
  51.  
  52. //---------------------
  53. //    .r includes
  54. //-----------------------
  55. #ifdef REZ
  56.  
  57. #ifndef __OCE_R__
  58. #include "OCE.r"
  59. #endif
  60.  
  61. #endif
  62.  
  63. //-----------------------------
  64. //        Debug Flags
  65. //----------------------------
  66. #define bHFSSlotEnable            0x80
  67. #define bBreakOnScheduleEPPC    0x40
  68. #define bRunIfKeychainLocked    0x20
  69. #define bEnableCommCaptureFile    0x10
  70. #define bEnableAsserts            0x08
  71. #define bRecieveAfterSendNow    0x04
  72. #define bLimitErrorReports        0x02
  73. #define bDiagnosticsEnabled        0x01
  74.  
  75. #ifdef REZ
  76.  
  77. //    Debug settings.
  78. type 'Dflg' {
  79.     boolean        disableHFSSlot, enableHFSSlot;
  80.     boolean        dontBreakOnScheduleEPPC, breakOnScheduleEPPC;
  81.     boolean        quitIfKeychainLocked,runIfKeyChainLocked;
  82.     boolean        disableIOTrace,enableIOTrace;
  83.     boolean        disableAsserts,enableAsserts;
  84.     boolean        dontReceiveAfterSendNow,receiveAfterSendNow;
  85.     boolean        dontLimitErrorReports,limitErrorReports;
  86.     boolean        disableDiagnostics,enableDiagnostics;
  87. };
  88.  
  89. #endif REZ
  90.  
  91. //---------------------------------
  92. //        Apple Event Dispatch Table 
  93. //        See 'aedt' in MPW Types.r
  94. //---------------------------------
  95.  
  96.  
  97. #ifndef REZ
  98. struct AEDTResource {
  99.     OSType    eventClass;
  100.     OSType    eventID;
  101.     OSType    eventRefCon;
  102. };
  103. typedef struct AEDTResource AEDTResource;
  104. #endif 
  105.  
  106.  
  107.  
  108. //--------------------------------------------
  109. //        Comm Channel Configiration Parameters
  110. //--------------------------------------------
  111.  
  112. #ifdef REZ
  113.  
  114. // for cstring resources
  115. type 'cstr' {
  116.     cstring;
  117. };
  118.  
  119.  
  120. // CTB MacPad Configuration strings - these are not 'cstr' because
  121. //    we cycle thru the set that describes all the macpad servers
  122. type 'mpad' {
  123.     cstring;
  124. };
  125.  
  126.  
  127. // CRC Table
  128. type 'crct' {
  129.     wide array  {
  130.             unsigned integer;
  131.     };
  132. };
  133.  
  134.  
  135.  
  136. //    Tool CTB parameters  -- one for each Modem Tool & X25 Tool
  137. type 'ctbp' {
  138.     longint;                    //    size of buffer for CTB configurations string
  139.     longint;                    //    open timeout in seconds
  140.     longint;                    //     close timeout in seconds
  141.     longint;                    //     read timeout in seconds
  142.     longint;                    //     write timeout in seconds
  143.     longint;                    //    minimum baud rate
  144.     
  145.     boolean        openSync,openASync;
  146.     boolean        closeSync,closeASync;
  147.     boolean        readSync,readASync;
  148.     boolean        writeSync,writeASync;
  149.     unsigned bitstring[12] = 0;            // want it to be 16 bits
  150.  
  151. };
  152.  
  153.  
  154. #endif REZ
  155.  
  156.  
  157.  
  158. #ifndef REZ
  159.  
  160. //    flag bits.
  161. #define kOpenASync    0x8000
  162. #define kCloseASync    0x4000
  163. #define kReadASync    0x2000
  164. #define kWriteASync    0x1000
  165.  
  166. struct CommParameterResource {
  167.     long                configStrBufSize;
  168.     long                openTimeout;
  169.     long                closeTimeout;
  170.     long                readTimeout;
  171.     long                writeTimeout;
  172.     long                minimumBaudRate;
  173.     short                flags;        // async flags.
  174.  
  175. };
  176. typedef struct CommParameterResource CommParameterResource;
  177.  
  178.  
  179.  
  180.  
  181. #endif
  182.  
  183.  
  184. //--------------------------------------------
  185. //        3 Configiration Parameters
  186. //--------------------------------------------
  187.  
  188. #ifdef REZ
  189.  
  190.  
  191. //    P3 protocol init packet   -- one for batch client
  192. type 'p3cf' {
  193.     longint;                    //    number of sendInit retrys.
  194.     longint;                    //    heart beat frequency
  195.     longint;                    //     host inactive timeout.
  196.     longint;                    //    max unacked rx data.
  197. };
  198.  
  199.  
  200. #if    qMacClient
  201.  
  202. type 'p3i ' {            //
  203.     byte;                //    platForm
  204.     byte;                //    version
  205.     byte;                //    subVersion
  206.     byte;                //    unUsed
  207.     integer;            //    wMachineMem
  208.     integer;              //    wPCType
  209.     byte;                //    bReleaseMonth
  210.     byte;               //    bReleaseDay
  211.     integer;               //    wCustomerClass
  212.     longint;            //    lUDOTimeStamp
  213.     integer;             //     wSysVersion
  214.     integer;              //    wSessionFlags
  215.     byte;                //    bVideoType    
  216.     byte;                //    bProcessorType
  217.     longint;               //    lMediaType
  218.     wide array [14] {    //     os_info[14]
  219.         byte;
  220.     };
  221.     longint;            //    foo1?
  222.     longint;                //    foo2?
  223. };
  224.  
  225. #else
  226.  
  227. type 'p3i ' {
  228.     byte;                //    platForm
  229.     byte;                //    version
  230.     byte;                //    subVersion
  231.     byte;                //    unUsed
  232.     integer;            //    wMachineMem
  233.     integer;              //    wPCType
  234.     byte;                //    bReleaseMonth
  235.     byte;               //    bReleaseDay
  236.     integer;               //    wCustomerClass
  237.     longint;            //    lUDOTimeStamp
  238.     integer;             //     wSysVersion
  239.     integer;              //    wSessionFlags
  240.     byte;                //    bVideoType    
  241.     byte;                //    bProcessorType
  242.     longint;               //    lMediaType
  243.     wide array [6] {    //     os_info[6]
  244.         byte;
  245.     };
  246.  
  247. };
  248.  
  249.  
  250. #endif qBatchClient
  251.  
  252. #endif REZ
  253.  
  254.  
  255.  
  256. #ifndef REZ
  257.  
  258.  
  259. struct P3ConfigResource {
  260.     long        nSendInitRetries;
  261.     long        heartBeatFreq;
  262.     long        hostInactiveTimeout;
  263.     long        maxUnackedRxData;
  264. };
  265. typedef struct P3ConfigResource P3ConfigResource;
  266.  
  267. #endif
  268.  
  269.  
  270. //-----------------------------------
  271. //    O t h e r D i r E x t T y p e s
  272. //-----------------------------------
  273.  
  274.  
  275. #ifdef REZ
  276. type 'dxtt' {
  277.     integer = $$Countof(SysDirArray);
  278.     wide array SysDirArray {
  279.         longint        dirExtType;
  280.         byte        notRString,isRString;
  281.         fill byte;
  282.         fill byte;
  283.         fill byte;
  284.         pstring;
  285.         align word;
  286.     };
  287.  
  288. };
  289.  
  290. #endif REZ
  291.  
  292.  
  293. #ifndef REZ
  294.  
  295.  
  296.  
  297.  
  298. //-----------------------------------------------------
  299. //        C D i r E x t T y p e L i s t I t e r a t o r
  300. //----------------------------------------------------
  301.  
  302.  
  303. struct DirExtTypeEntry {
  304.     OSType        extType;
  305.     Boolean        isRString;
  306.     char        fill1;
  307.     char        fill2;
  308.     char        fill3;
  309.     Str255        dirSysName;
  310. };
  311. typedef struct DirExtTypeEntry DirExtTypeEntry; 
  312.  
  313.  
  314. struct DirExtTypeTable {
  315.         short                    count;
  316.         DirExtTypeEntry            dirExtTypeDesc;
  317. };
  318. typedef struct DirExtTypeTable DirExtTypeTable;
  319.  
  320.  
  321. class CDirExtTypeTableIterator {
  322.     int                        fCurrentIndex;
  323.     int                        fNumOfExtTypes;
  324.     DirExtTypeTable**        fDirExtTypeTable;
  325.     long                    fCurrentOffset;        // offset to the current rstring in the resource.
  326. public:
  327.     CDirExtTypeTableIterator(short resID);
  328.     
  329.     DirExtTypeEntry*        FirstDirExtType();
  330.     Boolean                 More();
  331.     DirExtTypeEntry*        NextDirExtType();
  332.     
  333.     
  334. };
  335.  
  336.  
  337. inline Boolean CDirExtTypeTableIterator::More() { return fCurrentIndex <= fNumOfExtTypes; };
  338.  
  339.  
  340.  
  341.  
  342. #endif
  343.  
  344.  
  345. #endif __PMSAMResources__